package day10;

public class PhoneTest {
    public static void main(String[] args) {
        // 使用无参构造方法创建手机对象
        Phone phone1 = new Phone();
        phone1.setBrand("华为");
        phone1.setPrice(9999.0);
        
        // 使用有参构造方法创建手机对象
        Phone phone2 = new Phone("苹果", 19999.0);
        
        // 测试打电话功能
        phone1.call("15935288570");
        phone2.call("19935468570");
        
        // 测试发短信功能
        phone1.sendMessage("15935288570", "晚上出去吃烧烤？");
        phone2.sendMessage("19935468570", "Hi，how are you?");
        
        // 测试getter方法
        System.out.println("手机1的品牌：" + phone1.getBrand());
        System.out.println("手机1的价格：" + phone1.getPrice());
        System.out.println("手机2的品牌：" + phone2.getBrand());
        System.out.println("手机2的价格：" + phone2.getPrice());
    }
}